//
//  CFProgressConst.h
//  CFProgressHUD
//
//  Created by 千域互联 on 2018/3/16.
//  Copyright © 2018年 千域互联. All rights reserved.
//

#import <Foundation/Foundation.h>

#define CFProgressHUDNC [NSNotificationCenter defaultCenter]
#define CFProgressHUDDefaultDismissTimer 1.8
#define CFProgressHUDRGBColor(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

typedef NS_ENUM(NSUInteger, CFProgressHUDPosition) {
    CFProgressHUDPositionCenter = 0,    // 居中
    CFProgressHUDPositionTopLeft,       // 左上角
    CFProgressHUDPositionCenterLeft,    // 左中
    CFProgressHUDPositionBottomLeft,    // 左下角
    CFProgressHUDPositionBottomCenter,  // 下中
    CFProgressHUDPositionBottomRight,   // 右下角
    CFProgressHUDPositionCenterRight,   // 右中
    CFProgressHUDPositionTopRight,      // 右上角
    CFProgressHUDPositionTopCenter,     // 上中
};

typedef NS_ENUM(NSUInteger, CFProgressHUDStyle) {
    CFProgressHUDStyleExtraLight,
    CFProgressHUDStyleLight,            // 浅色背景，深色提示元素
    CFProgressHUDStyleDark              // 深色背景，白色提示元素
};

typedef NS_ENUM(NSUInteger, CFProgressHUDInteractionType) {
    CFProgressHUDInteractionTypeBlockAllTouches = 0,
    CFProgressHUDInteractionTypeBlockTouchesOnHUDView,
    CFProgressHUDInteractionTypeBlockNoTouches
};

typedef NS_ENUM(NSUInteger, CFProgressHUDParallaxMode) {
    CFProgressHUDParallaxModeDevice = 0,
    CFProgressHUDParallaxModeAlwaysOn,
    CFProgressHUDParallaxModeAlwaysOff
};

#ifndef fequal
#define fequal(a,b) (fabs((a) - (b)) < FLT_EPSILON)
#endif
